<?php

try {
	if(file_exists("./router/router.php")){
		require_once './router/router.php';
	}
	else {
		throw new Exception("Nie znaleziono pliku!");
	}
}
catch(Exception $e){
	return $e->getMessage();
}
class ApplicationRouterLoadClassMethodTest extends PHPUnit_Framework_TestCase {
	
	protected $router;
	
	protected function setUp(){
		$this->router = new Application_Router();
	}
	
	public function filepath_model_test_case(){
		$class_name = "Application_Model_Class";
		$expected = "./application/model/class.php";
		$this->assertEquals($expected, $this->router->load_class($class_name));
	}
	
	public function filepath_data_test_case(){
		$class_name = "Application_Data_Class";
		$expected = "./application/data/class.php";
		$this->assertEquals($expected, $this->router->load_class($class_name));
	}
	
	public function filepath_libraries_test_case(){
		$class_name = "Application_Library_Class";
		$expected = "./application/libraries/class.php";
		$this->assertEquals($expected, $this->router->load_class($class_name));
	}
	
	public function filepath_drivers_test_case(){
		$class_name = "Application_Driver_Class";
		$expected = "./application/libraries/drivers/class.php";
		$this->assertEquals($expected, $this->router->load_class($class_name));
	}
	
	public function filepath_other_test_case(){
		$class_name = "Application_Other_Class";
		$expected = "./application/Other/class.php";
		$this->assertEquals($expected, $this->router->load_class($class_name));
	}
}